package com.qiche.common;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.provider.SpecialProvider;

import java.util.List;

/**
 * @Author: Linzewen
 * @Date: 2018/4/20 0020 10:38
 */
public interface InsertListMapper<T> {
    /**
     *批量插入，支持数据库自增字段，支持回写
     * @param recordList
     * @return
     */
    @Options(useGeneratedKeys = true,keyProperty = "id")
    @InsertProvider(type = SpecialProvider.class,method = "dynamicSQL")
    int insertList(List<T> recordList);
}
